zynqmp: pm: Add support for setting PMU configuration object
authorLuca Ceresoli <[email protected]>
Thu, 28 Feb 2019 21:15:35 +0000 (22:15 +0100)
committerDimitris Papastamos <[email protected]>
Fri, 8 Mar 2019 15:35:30 +0000 (15:35 +0000)
Allow EL2 (e.g. U-Boot) to load the configuration object at runtime
into the Xilinx ZynqMP PMU firmware. This allows booting with U-Boot
and U-Boot SPL with PMU FW without hard-coding the configuration
object.

Signed-off-by: Luca Ceresoli <[email protected]>
plat/xilinx/zynqmp/pm_service/pm_api_sys.c

index f651880cf9dda73953685f8cb8cb8ec7b1d79e77..e0b9816e4f25574876377a73d20745542bb83255 100644 (file)
@@ -356,7 +356,10 @@ enum pm_ret_status pm_get_api_version(unsigned int *version)
  */
 enum pm_ret_status pm_set_configuration(unsigned int phys_addr)
 {
-       return PM_RET_ERROR_NOTSUPPORTED;
+       uint32_t payload[PAYLOAD_ARG_CNT];
+
+       PM_PACK_PAYLOAD2(payload, PM_SET_CONFIGURATION, phys_addr);
+       return pm_ipi_send_sync(primary_proc, payload, NULL, 0);
 }
 
 /**